package com.sibu.yx.promotion.service.impl.sys;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.doubo.common.model.response.CommonResponse;
import com.sibu.yx.promotion.common.manage.ResponseManage;
import com.sibu.yx.promotion.persistence.model.sys.SysRole;
import com.sibu.yx.promotion.persistence.mapper.SysRoleMapper;
import com.sibu.yx.promotion.service.sys.SysRoleService;

/**
 * @author suzheng
 * @date 2021-07-08
 **/
@Service
public class SysSysRoleServiceImpl implements SysRoleService {
    @Autowired
    private SysRoleMapper sysRoleMapper;

    @Override
    public CommonResponse<SysRole> getByName(String roleName) {
        SysRole sysRoles = sysRoleMapper.selectByRoleName(roleName);
        return ResponseManage.successIfNotNull(sysRoles);
    }
}
